package com.hades.xq.seckill.base;

public enum EmBusinessError implements CommonError {

    //100000开头为通用参数
    PARAMETER_VALIDATION_ERROR(100001, "参数不合法"),
    UNKNOW_ERROR(100002, "未知错误"),
    //20000开头为用户信息相关错误定义
    MD5_UNKNOW_ERROR(200001, "串改md5数据"),
    SECKILL_CLOSED(200002, "秒杀活动结束"),
    SECKILL_REPEAT(200003, "重复秒杀");


    private int errorCode;

    private String errorMsg;

    private EmBusinessError(int errorCode, String errorMsg) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    @Override
    public int getErrorCode() {
        return this.errorCode;
    }

    @Override
    public String getErrirMsg() {
        return this.errorMsg;
    }

    @Override
    public CommonError setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
        return this;
    }
}
